:root {
  --color-base-white: 0, 0%;
  --color-base-black: 240, 100%;
  --color-base-gray: 215, 14%;
  --color-base-blue: 212, 100%;
  --color-base-blue-dark: 212, 72%;
  --color-base-green: 158, 79%;
  --color-base-orange: 22, 100%;
  --color-base-purple: 269, 79%;
  --color-base-red: 351, 100%;
  --color-base-yellow: 41, 100%;

  /*
   * Color palettes are made using --color-base
   * variables, along with a lightness value to
   * define different variants.
   *
   */

  --color-gray-5: var(--color-base-gray), 5%;
  --color-gray-10: var(--color-base-gray), 10%;
  --color-gray-20: var(--color-base-gray), 20%;
  --color-gray-30: var(--color-base-gray), 30%;
  --color-gray-40: var(--color-base-gray), 40%;
  --color-gray-50: var(--color-base-gray), 50%;
  --color-gray-60: var(--color-base-gray), 60%;
  --color-gray-70: var(--color-base-gray), 70%;
  --color-gray-80: var(--color-base-gray), 80%;
  --color-gray-90: var(--color-base-gray), 90%;
  --color-gray-95: var(--color-base-gray), 95%;

  --color-blue: var(--color-base-blue), 61%;
  --color-blue-dark: var(--color-base-blue-dark), 39%;
  --color-green: var(--color-base-green), 42%;
  --color-orange: var(--color-base-orange), 50%;
  --color-purple: var(--color-base-purple), 54%;
  --color-red: var(--color-base-red), 54%;
  --color-yellow: var(--color-base-yellow), 59%;
}

:root {
  color-scheme: light;
  --theme-accent: #e8a15a;
  --theme-text-accent: #a67c52;
  --theme-accent-opacity: 0.15;
  --theme-divider: hsla(var(--color-gray-95), 1);
  --theme-text: hsla(var(--color-gray-10), 1);
  --theme-text-light: #333;
  --theme-text-light-gray: #666;
  /* @@@: not used anywhere */
  --theme-text-lighter: hsla(var(--color-gray-80), 1);
  --theme-bg: hsla(var(--color-base-white), 100%, 1);
  --theme-bg-hover: hsla(var(--color-gray-95), 1);
  --theme-bg-offset: hsla(var(--color-gray-90), 1);
  --theme-bg-accent: hsla(var(--color-blue), var(--theme-accent-opacity));
  --theme-code-inline-bg: hsla(var(--color-gray-95), 1);
  --theme-code-inline-text: var(--theme-text);
  --theme-code-bg: hsla(217, 19%, 27%, 1);
  --theme-code-text: hsla(var(--color-gray-95), 1);
  --theme-navbar-bg: hsla(var(--color-base-white), 100%, 1);
  --theme-navbar-height: 6rem;
  --theme-selection-color: #a67c52;
  --theme-selection-bg: #E2D7CF;
}

[data-theme='dark'] {
  color-scheme: dark;
  --theme-text: #e7e9ea;

  --theme-text-light: var(--theme-text);
  --theme-text-light-gray: #ccc;
  --theme-divider: #555;
  --theme-bg: #21262b;
  --placeholder-gradient-start: #2c3e50;
  --placeholder-gradient-end: #34495e;
  --pagefind-ui-text: var(--theme-text);
  --pagefind-ui-background: #21262b;
  --pagefind-ui-border: #333;
  --pagefind-ui-tag: #333;
  --theme-bg-offset: hsla(var(--theme-text), 1);
  --waline-color: var(--theme-text);
  --waline-bg-color: var(--theme-bg);
  --waline-bg-color-hover:var(--theme-bg);
  --theme-navbar-bg:var(--theme-bg);
}

body {
  background: var(--theme-bg);
  color: var(--theme-text);
  letter-spacing: 0.6px;
}

::selection {
  color: var(--theme-selection-color);
  background-color: var(--theme-selection-bg);
}
